import java.util.Scanner;

public class test {

    public static int menu() {
        System.out.println("=================================");
        System.out.println("1.添加图书");
        System.out.println("2.展示图书销量榜前十");
        System.out.println("3.展示所有图书");
        System.out.println("0.退出系统");
        System.out.println("=================================");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }

    public static void main(String[] args) {
        BookList bookList = new BookList();
        Scanner scanner = new Scanner(System.in);
        while (true){
            int choice = menu();
            switch (choice){
                case 0:
                    Exit.exit();
                    break;
                case 1:
                    bookList.add();
                    break;
                case 2:
                    bookList.show();
                    break;
                case 3:
                    bookList.showAll();
            }
        }
    }

}
